import request from '@/utils/request'

// 查询需求bug信息列表
export function listInfo(query) {
  return request({
    url: '/reportworld/demandBugInfo/list',
    method: 'get',
    params: query
  })
}

// 查询需求bug信息详细
export function getInfo(data) {
  return request({
    url: '/reportworld/demandBugInfo/getInfo',
    method: 'post',
    data: data
  })
}

// 新增需求bug信息
export function addInfo(data) {
  return request({
    url: '/reportworld/demandBugInfo',
    method: 'post',
    data: data
  })
}

// 修改需求bug信息
export function updateInfo(data) {
  return request({
    url: '/reportworld/demandBugInfo',
    method: 'put',
    data: data
  })
}

// 删除需求bug信息
export function delInfo(idList, hisVersion) {
  const data = {
    idList,
    hisVersion
  };
  return request({
    url: '/reportworld/demandBugInfo/remove',
    method: 'post',
    data: data
  })
}

// 初始化查询
export function init(data) {
  return request({
    url: '/reportworld/demandBugInfo/init',
    method: 'post',
    data: data
  })
}
